<?php
class Userslist {
    
    protected $_users = array();

    protected $_model = null;

    public function  __construct() {
       $this->_model = new UserslistObjModel();
       $this->_init();
    }

    private function _init() {
        $userIds = $this->_model->selectAllIds('user');
        foreach ($userIds as $userId) {
            $this->_users[] = new User($userId->id);
        }
    }

    public function getList() {
        return $this->_users;
    }



}